#include <stdio.h>
#include <stdint.h>
#include <string.h>

#include "common_errno.h"
#include "common_interface.h"

int main() {
    char result[1024] = { 0 };
    int olen = 0;

    char left[]  = "123";
    char right[] = "222";

    int ret = 0;

    ret = common_big_number_plus(result, &olen, sizeof(result), left, right);
    result[olen] = '\0';
    printf("ret is %d\n", ret);
    printf("%s\n", result);
    memset(result, 0, sizeof(result));

    ret = common_big_number_subtraction(result, &olen, sizeof(result), left, right);
    result[olen] = '\0';
    printf("ret is %d\n", ret);
    printf("%s\n", result);
    memset(result, 0, sizeof(result));

    ret = common_big_number_subtraction(result, &olen, sizeof(result), right, left);
    result[olen] = '\0';
    printf("ret is %d\n", ret);
    printf("%s\n", result);
    memset(result, 0, sizeof(result));

    ret = common_big_number_multiplication(result, &olen, sizeof(result), left, right);
    result[olen] = '\0';
    printf("ret is %d\n", ret);
    printf("%s\n", result);
    memset(result, 0, sizeof(result));

    return 0;
}